<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>调查问卷-明细</title>
<META content="text/html; charset=UTF-8" http-equiv=Content-Type>

<META HTTP-EQUIV="Pragma" CONTENT="no-cache">
<META HTTP-EQUIV="Cache-Control" CONTENT="no-cache">
<META HTTP-EQUIV="Expires" CONTENT="0">
<%@include file="../../../include/include.jsp"%>
<link rel="stylesheet" type="text/css" href="${webcontext}/css/datepicker.css" />
<link rel="stylesheet" type="text/css" href="${webcontext}/css/public.css" />
<link rel="stylesheet" type="text/css" href="${webcontext}/css/style_l.css" />

<script src="${jspath}/jquery/jquery-1.4.4.js" type="text/javascript"></script>
<script type="text/javascript" src="${webcontext}/javascript/jquery/jquery.ui.min.js"></script>
<script type="text/javascript" src="${webcontext}/javascript/ui.datepicker_zh-CN.js"></script>
<script type="text/javascript" src="${webcontext}/javascript/jquery/jquery.blockUI.js"></script>
<script type="text/javascript" src="${webcontext}/javascript/load_layer.js"></script>
<script type="text/javascript" src="${webcontext}/javascript/public.js"></script>

<script src="${jspath}/jquery/tree/jquery.jstree.js" type="text/javascript"></script>
<script src="${jspath}/jquery/tree/dmsTree.js" type="text/javascript"></script>
<script src="${jspath}/jquery/tree/orgTree.js" type="text/javascript"></script>

<script type="text/javascript">
$(function(){
	 
	selectRegionType(4);
	var checkedOrgs = eval("${questionnaireDetailDto.organizationIds}");
	defaultChecked(4, checkedOrgs);
	$("#orgTree").bind("loaded.jstree", function(){
		$("#orgTree").undelegate();
	});
	"${questionnaireDetailDto.type}" == "1"?$("#att").hide():$("#que").hide();
}); 
 
</script>
</head>

<body>
	<!-- content -->
	<div id="content">
		<!-- wrap -->
		<div id="wrap">
			<!-- breadcrumb -->
			<div id="breadcrumb">
				<div class="left">
					<span>调查问卷</span>
					<span>&gt;</span>
					<span>明细</span>
				</div>
				<div class="right">
					<a onclick="window.history.back();">返回</a>
				</div>
			</div>
			<!-- /breadcrumb -->

			<!-- info_div -->
			<form action="" method="pot" enctype="multipart/form-data"></form>
			<div class="info_div">
				<div class="title">
					<p class="min" title="点击展开/隐藏详细信息">基本资料</p>
				</div>
                <div>
				<table class="info_tab">
					<tr>
						<td class="label">问卷名称：</td>
						<td>${questionnaireDetailDto.name}</td>
                        <td class="label">问卷类型：</td>
                        <td>${questionnaireDetailDto.typeName}</td>
                        <td class="label">生效日期：</td>
                        <td><fmt:formatDate value="${questionnaireDetailDto.effectiveDate}" pattern="yyyy-MM-dd"/></td>
                        <td class="label">失效日期：</td>
                        <td><fmt:formatDate value="${questionnaireDetailDto.expiryDate}" pattern="yyyy-MM-dd"/></td>
                    </tr>
					<tr>
					  <td class="label">是否需要评分：</td>
					  <td>${questionnaireDetailDto.isNeedScoreName}</td>
					  <td class="label">最高所得积分：</td>
					  <td>${questionnaireDetailDto.maxScore}</td>
					  <td class="label">问卷总分：</td>
					  <td>${questionnaireDetailDto.totalScore}</td>
					  <td class="label">&nbsp;</td>
					  <td>&nbsp;</td>
				  </tr>
                    
					<tr>
					  <td class="label">问卷描述：</td>
					  <td colspan="2">${questionnaireDetailDto.description}</td>
					  <td>&nbsp;</td>
					  <td class="label">&nbsp;</td>
					  <td>&nbsp;</td>
					  <td class="label">&nbsp;</td>
					  <td>&nbsp;</td>
				  </tr>
				</table>
                </div>
			</div>
			<!-- /info_div -->
            <div class="spliter h_10"></div>
             <!-- input_div -->
			<div class="input_div">
				<div class="title">
					<span>经销商</span>
			  	</div>
				
				<!-- dealer -->
				<div id="area_jxs">
					<div class="spliter h_5"></div>
                    <!-- tree -->
                    <div id="orgTree" class="tree_div"></div>
                    <!-- /tree -->
				</div>
				<!-- /dealer -->
				
				<div class="spliter h_5"></div>
			</div>
			<!-- /input_div -->
            <div class="spliter h_5"></div>
           
            <!-- info_div -->
			<div class="info_div">
            	<div class="title">
					<p class="min" title="点击展开/隐藏详细信息">岗位</p>
				</div>
                <div>
				<table class="info_tab">
				<tr>
					<td class="td_tab">
						<div class="data_div">
							<table class="data_tab">
								<tr>
									<th class="w_20">发布岗位</th>
									<th class="w_20">岗位名称</th>
								</tr>
								
								<core:forEach items="${questionnaireDetailDto.questionnaireUsergrpList}" var="usergrp">
								<tr>						
									<td>${usergrp.userGroup.userGroupCode}</td>
									<td>${usergrp.userGroup.userGroupName}</td>
								</tr>
								</core:forEach>
			
							</table>
						</div>
                    </td>
				</tr>
			</table>
                </div>
				</div>
			<!-- /info_div -->
            <div class="spliter h_5"></div>
            
            <!-- info_div -->
			<div class="info_div" id="att">
				<div class="title">
					<p class="min" title="点击展开/隐藏详细信息">附件问卷</p>
				</div>
                <div>
				<table class="search_tab">
					<tr>
						<td class="label">附件查看：</td>
						<td>
							<a id="ihref" href="${questionnaireDetailDto.questionnaireAttachment.attachmentUrl}" class="accessory">${questionnaireDetailDto.questionnaireAttachment.attachmentName}</a>
						</td>
					</tr>
				</table>
                <div class="spliter h_10"></div>
                </div>
			</div>
            <!-- /info_div -->
            
            <div class="spliter h_5"></div>
            
            <!-- info_div -->
			<div class="info_div" id="que">
            	<div class="title">
					<p class="min" title="点击展开/隐藏详细信息">问题</p>
				</div>
                <div>
						<div class="data_div">
							<table class="data_tab">
								<tr>
                                	<th >题目名称</th>
									<th >题目类型</th>
                                    <th >题目分数</th>
									<th >题目明细名称</th>
                                    <th >题目明细得分</th>
								</tr>
								
								<core:forEach items="${questionnaireDetailDto.questionnaireItemDto}" var="itemInfo">
									<tr>
										<td>${itemInfo.itemName}</td>
										<td>${itemInfo.itemType}</td>
										<td>${itemInfo.itemScore}</td>
										<td>
										<core:forEach items="${questionnaireDetailDto.questionnaireItemOptionDto}" var="itemOption">
											<core:if test="${itemInfo.id == itemOption.itemId}">
											<span>${itemOption.optionName}</span><br />
											</core:if>
										</core:forEach>
										</td>
										<td>
										<core:forEach items="${questionnaireDetailDto.questionnaireItemOptionDto}" var="itemOption">
                                        	<core:if test="${itemInfo.id == itemOption.itemId}">
                                        	<span>${itemOption.optionScore}</span><br />
                                        	</core:if>
										</core:forEach>
										</td>
					
									</tr>
								</core:forEach>
							</table>
						</div>
                </div>
			</div>
			<!-- /info_div -->
			</form>
		</div>
		<!-- /wrap -->
	</div>
	<!-- /content -->
	
</body>
</html>